import { Toast } from "vant";
// Vue.use(Toast)
export default {
//  
    install (Vue, options){
        
    
     Vue.prototype.ckxq = function (cccard) {
        this.$Spin.show();
        axios.get(this.$store.state.host + "/plans/findPlanDetail?sort=executeTime&order=asc", {
            params: {
                merchantId: this.$store.state.merchantId,
                token: this.$store.state.token,
                planId: cccard.plan.pId,
                pageSize: 200
            }
        }).then(res => {
            this.$Spin.hide();
            this.$router.push({
                name: "jhxq",
                params: {
                    cccard: cccard,
                    res: res.data.data //计划详情列表
                }
            });
        });
    }
    Vue.prototype.historyBack = "" //监听返回键
    Vue.prototype.getcardlist = function () {
        axios.get(this.$store.state.host + "/customer/bankCard/findList", {
            params: {
                    type:"2",  //1:储蓄卡2信用卡
                    token: this.$store.state.token
                }
            })
            .then(res => {
                console.log("res",res)
                if(res.data.code==-1){
                    Toast('Token已过期请重新登录');
                }else{
                    this.$store.state.cccardList = res.data.data;
                }
              
            });
        
    }

    Vue.prototype.show = function (){
        // for(let i=0;i<this.$store.state.bank.length;i++){
        //     if(this.$store.state.bank[i]!=undefined){
        //         this.$store.state.bank[i]=this.$store.state.bank[i].toUpperCase()
        //     }
        // }
        if(this.$store.state.bank.indexOf(this.cccard.issuingBank) < 0){
          this.isActive = true
        }
    }

 }
} 








